<?php
namespace Home\Controller;
use Think\Controller;
class BaseController extends Controller {

    /**
     * 接口请求初始化
     */
    function __construct()
    {
        parent::__construct();

        // 初始化接口原始数据
       $params = $_POST;
       //var_dump($params);die;
        // JSON字符转数组
        $this->params = $params;

    }
    /**
     * 返回响应数据
     */
    protected function _responseData($data)
    {
        //header('Content-Type:application/json;charset=UTF-8');
        if(is_json($data)){
        echo $data;    
        }else{

        var_dump($data);
        }    
        exit;
    }


    
}